<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>6.270 - JoyOS: pid_controller Struct Reference</title>
	<link href="main.css" media="screen" rel="Stylesheet" type="text/css"/>
	<link href="doxygen.css" rel="stylesheet" type="text/css">
</head>  
<body>
	<div id="header">
		<div id="headerb">
		<div id="headtext">
			<span class="titletext">AUTONOMOUS ROBOT DESIGN COMPETITION</span>
			6.270
		</div>
		<div class="mainmenu">
			<a href="http://web.mit.edu/6.270/www">Home</a>
		 	&bull;
			<a href="http://web.mit.edu/6.270/www/about/">About</a> 
		 	&bull;
			<a href="http://web.mit.edu/6.270/www/sponsors/">Sponsors</a>
		 	&bull;
			<a href="http://web.mit.edu/6.270/www/contests/">Past Contests</a> 
		 	&bull;
			<a href="http://web.mit.edu/6.270/www/contestants/">Contestant Information</a>
		</div>
	</div>
	</div>

<div class="maincontent">
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li id="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
  </ul></div>
<h1>pid_controller Struct Reference</h1><!-- doxytag: class="pid_controller" --><code>#include &lt;pid.h&gt;</code>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="308fc052bb4ebb0cd17fff510b9e049e"></a><!-- doxytag: member="pid_controller::kp" ref="308fc052bb4ebb0cd17fff510b9e049e" args="" -->
float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpid__controller.html#308fc052bb4ebb0cd17fff510b9e049e">kp</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Proportional constant. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8ab69e74eccc9027aef53f8a6ae663b0"></a><!-- doxytag: member="pid_controller::ki" ref="8ab69e74eccc9027aef53f8a6ae663b0" args="" -->
float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpid__controller.html#8ab69e74eccc9027aef53f8a6ae663b0">ki</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Integral constant. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b739520c0d6880c0d7318c67fb2de5a3"></a><!-- doxytag: member="pid_controller::kd" ref="b739520c0d6880c0d7318c67fb2de5a3" args="" -->
float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpid__controller.html#b739520c0d6880c0d7318c67fb2de5a3">kd</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Derivative constant. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4b5cf32e8d40c9be7daf743ddd802cd6"></a><!-- doxytag: member="pid_controller::input" ref="4b5cf32e8d40c9be7daf743ddd802cd6" args=")()" -->
float(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpid__controller.html#4b5cf32e8d40c9be7daf743ddd802cd6">input</a> )()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Input function. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ad641ffd78c87e4eeff200a522fd1e07"></a><!-- doxytag: member="pid_controller::output" ref="ad641ffd78c87e4eeff200a522fd1e07" args=")(float value)" -->
void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpid__controller.html#ad641ffd78c87e4eeff200a522fd1e07">output</a> )(float value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Output drive function. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f389adeae330e8648376a573c20c25b8"></a><!-- doxytag: member="pid_controller::goal" ref="f389adeae330e8648376a573c20c25b8" args="" -->
float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpid__controller.html#f389adeae330e8648376a573c20c25b8">goal</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">PID target. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d3f9eebb3bf2021e6ebd37de1d3fdd8c"></a><!-- doxytag: member="pid_controller::sum" ref="d3f9eebb3bf2021e6ebd37de1d3fdd8c" args="" -->
float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpid__controller.html#d3f9eebb3bf2021e6ebd37de1d3fdd8c">sum</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Integration summation. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67495dcbd666beb7e2b33e9129c4ff1e"></a><!-- doxytag: member="pid_controller::has_past" ref="67495dcbd666beb7e2b33e9129c4ff1e" args="" -->
uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpid__controller.html#67495dcbd666beb7e2b33e9129c4ff1e">has_past</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">If false, last_val/time are undefined. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d7bb7e07fe91f2bee1d77e0e64e5a97d"></a><!-- doxytag: member="pid_controller::last_val" ref="d7bb7e07fe91f2bee1d77e0e64e5a97d" args="" -->
float&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpid__controller.html#d7bb7e07fe91f2bee1d77e0e64e5a97d">last_val</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">previous value for D <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6dd85f2392264aceac3fe5348a221968"></a><!-- doxytag: member="pid_controller::last_time" ref="6dd85f2392264aceac3fe5348a221968" args="" -->
uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpid__controller.html#6dd85f2392264aceac3fe5348a221968">last_time</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">previous reading time <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f80809b4d85635d30e755e65626a7fbe"></a><!-- doxytag: member="pid_controller::enabled" ref="f80809b4d85635d30e755e65626a7fbe" args="" -->
uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpid__controller.html#f80809b4d85635d30e755e65626a7fbe">enabled</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">whether the PID is currently running <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
PID Controller structure 
<p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li>lib/<a class="el" href="pid_8h.html">pid.h</a></ul>
</div>
<div class="maincontent">
	<div class="footer centre">
		<hr>
		Generated on Tue Jan 29 23:17:08 2008 by&nbsp;<a href="http://www.doxygen.org/index.html">Doxygen</a> 1.5.1<br/>
		6.270 Staff, 2008 | 
		<a href="mailto:6.270-organizers@mit.edu">Contact Us</a> | 
		<a href="http://web.mit.edu">MIT</a>
	</div>
</div>
</body>
</html>
